package com.ddwl.wallet.dao;

import com.ddwl.common.dao.TkDao;
import com.ddwl.common.util.BeanConverUtils;
import com.ddwl.schema.vo.wallet.RecordViewsVo;
import com.ddwl.wallet.dao.dto.DistOrderStatisticsQueryDto;
import com.ddwl.wallet.dao.mapper.RecordViewsMapper;
import com.ddwl.wallet.dao.model.RecordViews;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 点击记录数dao
 *
 * @author wenbin
 */
@Repository
public class RecordViewsDao extends TkDao<RecordViewsMapper, RecordViews> {

    public RecordViewsVo getPersonViewsCount(DistOrderStatisticsQueryDto bo){
        return BeanConverUtils.convertBean(baseMapper.queryPersonViewsCount(bo),RecordViewsVo.class);
    }

    public RecordViewsVo getTeamViewsCount(DistOrderStatisticsQueryDto bo){
        return BeanConverUtils.convertBean(baseMapper.queryTeamViewsCount(bo),RecordViewsVo.class);
    }

    public void batchUpdateRecord(List<RecordViews> recordViewsList) {
        baseMapper.batchUpdateRecord(recordViewsList);
    }

}
